package com.yellowpage.bigdata.data;

import javax.persistence.*;
import java.sql.Date;

/**
 * Created by Sun on 2015/9/8.
 */
@Entity
@Table(name = "tm_apponoff_imei_retain", schema = "", catalog = "omc")
public class TmApponoffImeiRetain {
    private int tmApponoffImeiRetainId;
    private String logDate;
    private String showDate;
    private Integer imeiNewCount;
    private String nextDayRetained;
    private String threeDayRetained;
    private String sevenDayRetained;
    private String thirtyDayRetained;
    private Integer createUser;
    private Date createTime;
    private String note;

    @Id
    @Column(name = "TM_APPONOFF_IMEI_RETAIN_ID", nullable = false, insertable = true, updatable = true)
    public int getTmApponoffImeiRetainId() {
        return tmApponoffImeiRetainId;
    }

    public void setTmApponoffImeiRetainId(int tmApponoffImeiRetainId) {
        this.tmApponoffImeiRetainId = tmApponoffImeiRetainId;
    }

    @Basic
    @Column(name = "LOG_DATE", nullable = true, insertable = true, updatable = true, length = 64)
    public String getLogDate() {
        return logDate;
    }

    public void setLogDate(String logDate) {
        this.logDate = logDate;
    }

    @Basic
    @Column(name = "SHOW_DATE", nullable = true, insertable = true, updatable = true, length = 64)
    public String getShowDate() {
        return showDate;
    }

    public void setShowDate(String showDate) {
        this.showDate = showDate;
    }

    @Basic
    @Column(name = "IMEI_NEW_COUNT", nullable = true, insertable = true, updatable = true)
    public Integer getImeiNewCount() {
        return imeiNewCount;
    }

    public void setImeiNewCount(Integer imeiNewCount) {
        this.imeiNewCount = imeiNewCount;
    }

    @Basic
    @Column(name = "NEXT_DAY_RETAINED", nullable = true, insertable = true, updatable = true, length = 18)
    public String getNextDayRetained() {
        return nextDayRetained;
    }

    public void setNextDayRetained(String nextDayRetained) {
        this.nextDayRetained = nextDayRetained;
    }

    @Basic
    @Column(name = "THREE_DAY_RETAINED", nullable = true, insertable = true, updatable = true, length = 18)
    public String getThreeDayRetained() {
        return threeDayRetained;
    }

    public void setThreeDayRetained(String threeDayRetained) {
        this.threeDayRetained = threeDayRetained;
    }

    @Basic
    @Column(name = "SEVEN_DAY_RETAINED", nullable = true, insertable = true, updatable = true, length = 18)
    public String getSevenDayRetained() {
        return sevenDayRetained;
    }

    public void setSevenDayRetained(String sevenDayRetained) {
        this.sevenDayRetained = sevenDayRetained;
    }

    @Basic
    @Column(name = "THIRTY_DAY_RETAINED", nullable = true, insertable = true, updatable = true, length = 18)
    public String getThirtyDayRetained() {
        return thirtyDayRetained;
    }

    public void setThirtyDayRetained(String thirtyDayRetained) {
        this.thirtyDayRetained = thirtyDayRetained;
    }

    @Basic
    @Column(name = "CREATE_USER", nullable = true, insertable = true, updatable = true)
    public Integer getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "CREATE_TIME", nullable = true, insertable = true, updatable = true)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "NOTE", nullable = true, insertable = true, updatable = true, length = 128)
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TmApponoffImeiRetain that = (TmApponoffImeiRetain) o;

        if (tmApponoffImeiRetainId != that.tmApponoffImeiRetainId) return false;
        if (logDate != null ? !logDate.equals(that.logDate) : that.logDate != null) return false;
        if (showDate != null ? !showDate.equals(that.showDate) : that.showDate != null) return false;
        if (imeiNewCount != null ? !imeiNewCount.equals(that.imeiNewCount) : that.imeiNewCount != null) return false;
        if (nextDayRetained != null ? !nextDayRetained.equals(that.nextDayRetained) : that.nextDayRetained != null)
            return false;
        if (threeDayRetained != null ? !threeDayRetained.equals(that.threeDayRetained) : that.threeDayRetained != null)
            return false;
        if (sevenDayRetained != null ? !sevenDayRetained.equals(that.sevenDayRetained) : that.sevenDayRetained != null)
            return false;
        if (thirtyDayRetained != null ? !thirtyDayRetained.equals(that.thirtyDayRetained) : that.thirtyDayRetained != null)
            return false;
        if (createUser != null ? !createUser.equals(that.createUser) : that.createUser != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tmApponoffImeiRetainId;
        result = 31 * result + (logDate != null ? logDate.hashCode() : 0);
        result = 31 * result + (showDate != null ? showDate.hashCode() : 0);
        result = 31 * result + (imeiNewCount != null ? imeiNewCount.hashCode() : 0);
        result = 31 * result + (nextDayRetained != null ? nextDayRetained.hashCode() : 0);
        result = 31 * result + (threeDayRetained != null ? threeDayRetained.hashCode() : 0);
        result = 31 * result + (sevenDayRetained != null ? sevenDayRetained.hashCode() : 0);
        result = 31 * result + (thirtyDayRetained != null ? thirtyDayRetained.hashCode() : 0);
        result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        return result;
    }
}
